package com.example.tianling.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.tianling.common.params.PublishLearnArticleDo;
import com.example.tianling.common.params.PublishTrainArticleDo;
import com.example.tianling.common.vo.TrainArticleVo;
import com.example.tianling.common.vo.article;
import com.example.tianling.entity.ArticleEntity;
import com.example.tianling.entity.UserEntity;
import org.json.JSONException;

import java.io.IOException;
import java.text.ParseException;

public interface ForumService {
    IPage<article> load(int pageNum, int typeNum);
    IPage<TrainArticleVo> loadTrian(int pageNum, int typeNum);
    ArticleEntity publish_learn(PublishLearnArticleDo publishLearnArticleDo, UserEntity user) throws IOException;
     void publish_train_content(PublishLearnArticleDo publishLearnArticleDo,String userId,String roomId)  ;
     int publish_train(PublishTrainArticleDo publishTrainArticleDo,String userId) throws ParseException;
    //搜索
    IPage<article> search(Integer page, Integer type,String keyword);
    IPage<TrainArticleVo> searchTrain(Integer page, Integer type,String keyword);
    public boolean is_follow_like_save(String user_id,String other_id,String action);
}
